const line = readline();

function main(num){
    let res =  [...(parseInt(num,10).toString(2))];
//     console.log(typeof res[0])
    res = res.filter((item)=> item === '1')
    return res.length;
}

console.log(main(line))